import React from 'react'

type Props = {
    userObj: {
        name: string,
        age: number
    },
    edituser: () => void
}

export default function Son({ userObj, edituser }: Props) {
    return (
        <div>
            <p>Son子组件</p>
            <p>{userObj.name}-{userObj.age}</p>
            <button onClick={() => {
                edituser()
            }}>修改年龄</button>
        </div>
    )
}